package com.leaves.common.publicmethod.methods;

import cn.dev33.satoken.stp.StpUtil;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;


/**
 * @Author: LEAVES
 * @Version 1.0
 * @Date: 2021年03月09日  17时06分06秒
 * @Description:
 */
public class DealToken {

    /**
     * 获取登录ID
     *
     * @param request
     * @return
     */
    public static String getLoginId(HttpServletRequest request) {
        //String authorization = request.getHeader("authorization");
        //String token = authorization.substring(7);
        String loginId = StpUtil.getLoginIdAsString();
        return loginId;
    }
}
